import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/index",
  },
  {
    path: "/index",
    name: "index",
    component: () => import("../views/Index.vue"),
  },
  {
    path: "/destination",
    name: "destination",
    component: () => import("../views/Destination.vue"),
  },
  {
    path: "/destination_detail",
    name: "destination_detail",
    component: () => import("../views/Destination_detail.vue"),
  },
  {
    path: "/strategy_index",
    name: "strategy_index",
    component: () => import("../views/Strategy_index.vue"),
  },
  {
    path: "/strategy_detail",
    name: "strategy_detail",
    component: () => import("../views/Strategy_detail.vue"),
  },
  {
    path: "/travel_index",
    name: "travel_index",
    component: () => import("../views/Travel_index.vue"),
  },
  {
    path: "/traveldetail",
    name: "traveldetail",
    component: () => import("../views/Traveldetail.vue"),
  },
  {
    path: "/search",
    name: "search",
    component: () => import("../views/SearchAll.vue"),
  },
  {
    path: "/regist",
    name: "regist",
    component: () => import("../views/Regist.vue"),
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
